#ifndef __SYS_H
#define __SYS_H	

//* mian、timer、idle三个系统启动的任务优先级分别是12、4、10
#define THTCPSRV_PRIO       13	//* Tcp服务器线程优先级
#define THTCPCLT_PRIO       14	//* Tcp客户端线程优先级
#define THTCPCLT_TIMESLICE  5   //* 分配给tcp客户端的运行时间片

#if NETTOOLS_TELNETSRV
#define THTELNETSRV_PRIO  7
#define THNVT0_PRIO       8
#define THNVT1_PRIO       9
#define THNVTCMD_PRIO     11
#endif

#define THOSTIMERCOUNT_PRIO 6	//* onps栈定时器计数线程优先级
#if SUPPORT_SACK
#define THTCPHANDLER_PRIO   5   //* onps栈tcp协议主处理线程
#endif
#define THETHIIRECV_PRIO    3	//* ethernet网卡接收线程优先级

//* 电平值
typedef enum {
	LOW  = 0,
	HIGH = 1
} ENUM_LEVEL; 

//* LED
//* ============================================================================
#define RCC_LED     RCC_APB2Periph_GPIOB
#define	PORT_LED    GPIOB
#define	PIN_LED1    GPIO_Pin_0
#define LED1(level) GPIO_WriteBit(PORT_LED, PIN_LED1, level ? Bit_SET : Bit_RESET)
#define	PIN_LED2    GPIO_Pin_1
#define LED2(level) GPIO_WriteBit(PORT_LED, PIN_LED2, level ? Bit_SET : Bit_RESET)
#define LED1_ON()   LED1(LOW)
#define LED2_ON()   LED2(LOW)
#define LED1_OFF()  LED1(HIGH)
#define LED2_OFF()  LED2(HIGH)


//* 测试代码配置
//* ============================================================================
#define TCP_COMMU_TEST_BY_IPV6  1 //* 使用Ipv6进行tcp通讯测试


#endif
